double dist(double x1, double y1, double x2, double y2)
{
    double d1;
    d1 = sqrt(pow((x1 - x2), 2) + pow((y1 - y2), 2));
    return d1;
};